﻿using Common.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Database.Mappers
{
    public partial class Mapper
    {
        public ActionLogDTO Map(ActionLog actionLog,
                                CharacterDTO characterDTO = null,
                                TileDTO tileDTO = null)
        {
            return new ActionLogDTO
            {
                Id = actionLog.Id,
                Character = characterDTO,
                Tile = tileDTO,
                TimeStamp = actionLog.TimeStamp
            };
        }

        public ActionLog Map(ActionLogDTO actionLog,
                             Character character = null,
                             Tile tile = null)
        {
            return new ActionLog
            {
                Id = actionLog.Id,
                Character = character,
                Tile = tile,
                TimeStamp = actionLog.TimeStamp
            };
        }
    }
}
